@inherits PartialViewMacroPage
@using System;
@using System.Linq;
@using Umbraco.Cms.Web;
@using Umbraco.Cms.Web.Macros;
@using Umbraco.Framework;
@using PBDesk.com.Extension.UmbHelper;
@using System.Collections.Generic;
@using PBDesk.com.Extension.FeedsAggregator;
@using PBDesk.com.Extension.FeedsAggregator.Entities;
@{
  List<C9Item> twc9Items = MyHelper.GetTWC9Items();	
  int counter = 1;
  string qsDt = Request.QueryString["dt"] ?? "";
  C9Item twc9Item = null;
  if(!string.IsNullOrEmpty(qsDt))
  {
   twc9Item = twc9Items.Single<C9Item>(i => i.PageLink.EndsWith(qsDt));
  }
  if(twc9Item == null)
   {
   twc9Item = twc9Items[0];
   }
  string vFile = FeedHelper.GetMP4Media(twc9Item) ??  string.Empty;
  
 
}
<h1 class="servicetitle">@twc9Item.Title</h1>
<div>@twc9Item.PubDate.ToString("MMMM dd, yyyy")</div>
<br/>
@Umbraco.RenderMacro("videoPlayer270", new { MP4File = vFile, PosterFile = twc9Item.Thumbnails[2].Url, TrackTitle = twc9Item.Title })
<div style="text-align:justify">@Html.Raw(twc9Item.Description)</div>

@foreach(C9Item item in twc9Items)
{
 <div><a href="/technews/twc9?seq=@counter">@item.Title</a> @item.PageLink</div>
 counter++;
}
